<template>
  <div>
    <button @click="xg">修改密码</button>
    <button @click="removeLogin">退出登录</button>
  </div>
</template>

<script>
import { removeToken } from "@/utils/auth";
import { changePassword } from "@/api/login.js";
export default {
  data() {
    return {
      key: "",
    };
  },
  mounted() {
    setTimeout(() => {
      this.xg();
    }, 2000);
  },
  methods: {
    removeLogin() {
      removeToken();
      this.$router.push("/");
    },
    xg() {
      changePassword().then((res) => {
        // console.log(res, "res");
      });
    },
  },
};
</script>

<style>
</style>